<template>
    <div class="container">
        <div class="goBack" @click="back">返回</div>
        <div class="body">
            <div class="title">
               {{dataList.title}}
            </div>
            <div class="state">
                <div class="status">
                    <!-- <el-button size="medium">通过</el-button>
                    <el-button type="primary" size="medium">驳回</el-button> -->
                </div>
                <div class="establish">
                    <span>创建人：{{dataList.creatorName}}</span><span>类型:{{dataList.categoryName}}</span>
                    <span>日期：{{dataList.modifyTime}}</span>
                </div>
            </div>
            <div class="content" v-html="dataList.content">
            </div>
            <!-- <div class="like">
                原文链接:
            </div> -->
        </div>
    </div>
</template>
<script>
    import {  newsFindById } from '../../api/index';
    export default {
        name: 'invitation',

        data() {
            return {
              dataList:''
            }
        },
        created() {
         this.newsDetail() 
        },
       
        methods: {
          back(){
            this.$router.go(-1)
          },
            async newsDetail() {
                let res = await newsFindById({ id: this.$route.query.id })
                if (res.data.status == 100) {
                  this.dataList =  res.data.data
                }
            },
           
        }
    }

</script>
<style scoped>
.content{
  margin: 0 50px;
}
    .title {
        font-size: 18px;
        font-weight: 700;
    }

    .body {
        margin: 2rem 3rem;
    }

    .state {
        margin-top: 2rem;
        display: flex;
        justify-content: space-between;
        border-bottom: 1px solid #ddd;
        padding-bottom: 1rem;
    }

    .establish span {
        margin-left: 1rem;
        font-size: 14px;
    }
    .like{
        margin-top: 1rem;
        font-size: 16px;
    }
    .goBack{
      width: 70px;
      height: 35px;
      background: #f5f5f5;
      text-align: center;
      line-height: 35px;
      border-radius: 7px;
    }
</style>